// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_MST_SUPPLIER
// * CreateDate    : 2014-06-05 18:30:18
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:18
// * LastChanger   : 2014-06-05 18:30:18
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class MstSupplierEntity : EntityBase
    {
        public MstSupplierTable TableSchema
        {
            get
            {
                return MstSupplierTable.Current;
            }
		}
		
		public MstSupplierEntity()
        {

        }
		
		public MstSupplierEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.SupplierCode = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_CODE"]));
			this.SupplierName = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_NAME"]));
			this.SupplierFullName = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_FULL_NAME"]));
			this.Contact = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT"]));
			this.ContactPhone = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_PHONE"]));
			this.Countory = Convert.ToString(CommonFunctions.ToObject(dr["COUNTORY"]));
			this.Province = Convert.ToString(CommonFunctions.ToObject(dr["PROVINCE"]));
			this.City = Convert.ToString(CommonFunctions.ToObject(dr["CITY"]));
			this.Address = Convert.ToString(CommonFunctions.ToObject(dr["ADDRESS"]));
			this.ZipCode = Convert.ToString(CommonFunctions.ToObject(dr["ZIP_CODE"]));
			this.Email = Convert.ToString(CommonFunctions.ToObject(dr["EMAIL"]));
			this.Telephone = Convert.ToString(CommonFunctions.ToObject(dr["TELEPHONE"]));
			this.DefaultCurrency = Convert.ToString(CommonFunctions.ToObject(dr["DEFAULT_CURRENCY"]));
			this.Bank = Convert.ToString(CommonFunctions.ToObject(dr["BANK"]));
			this.BankAccount = Convert.ToString(CommonFunctions.ToObject(dr["BANK_ACCOUNT"]));
			this.TaxAccount = Convert.ToString(CommonFunctions.ToObject(dr["TAX_ACCOUNT"]));
			this.Level = Convert.ToString(CommonFunctions.ToObject(dr["LEVEL"]));
			this.LegalPerson = Convert.ToString(CommonFunctions.ToObject(dr["LEGAL_PERSON"]));
			this.RegisteredCapital = Convert.ToDecimal(CommonFunctions.ToObject(dr["REGISTERED_CAPITAL"]));
			this.ProductScope = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_SCOPE"]));
			this.RegisteredAddress = Convert.ToString(CommonFunctions.ToObject(dr["REGISTERED_ADDRESS"]));
			this.QuantitySystem = Convert.ToString(CommonFunctions.ToObject(dr["QUANTITY_SYSTEM"]));
			this.AllowProducting = Convert.ToString(CommonFunctions.ToObject(dr["ALLOW_PRODUCTING"]));
			this.WebsiteUrl = Convert.ToString(CommonFunctions.ToObject(dr["WEBSITE_URL"]));
			this.SupplierType = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_TYPE"]));
			this.PaymentType = Convert.ToString(CommonFunctions.ToObject(dr["PAYMENT_TYPE"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }
		
		public MstSupplierEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.SupplierCode = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_CODE"]));
			this.SupplierName = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_NAME"]));
			this.SupplierFullName = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_FULL_NAME"]));
			this.Contact = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT"]));
			this.ContactPhone = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_PHONE"]));
			this.Countory = Convert.ToString(CommonFunctions.ToObject(dr["COUNTORY"]));
			this.Province = Convert.ToString(CommonFunctions.ToObject(dr["PROVINCE"]));
			this.City = Convert.ToString(CommonFunctions.ToObject(dr["CITY"]));
			this.Address = Convert.ToString(CommonFunctions.ToObject(dr["ADDRESS"]));
			this.ZipCode = Convert.ToString(CommonFunctions.ToObject(dr["ZIP_CODE"]));
			this.Email = Convert.ToString(CommonFunctions.ToObject(dr["EMAIL"]));
			this.Telephone = Convert.ToString(CommonFunctions.ToObject(dr["TELEPHONE"]));
			this.DefaultCurrency = Convert.ToString(CommonFunctions.ToObject(dr["DEFAULT_CURRENCY"]));
			this.Bank = Convert.ToString(CommonFunctions.ToObject(dr["BANK"]));
			this.BankAccount = Convert.ToString(CommonFunctions.ToObject(dr["BANK_ACCOUNT"]));
			this.TaxAccount = Convert.ToString(CommonFunctions.ToObject(dr["TAX_ACCOUNT"]));
			this.Level = Convert.ToString(CommonFunctions.ToObject(dr["LEVEL"]));
			this.LegalPerson = Convert.ToString(CommonFunctions.ToObject(dr["LEGAL_PERSON"]));
			this.RegisteredCapital = Convert.ToDecimal(CommonFunctions.ToObject(dr["REGISTERED_CAPITAL"]));
			this.ProductScope = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_SCOPE"]));
			this.RegisteredAddress = Convert.ToString(CommonFunctions.ToObject(dr["REGISTERED_ADDRESS"]));
			this.QuantitySystem = Convert.ToString(CommonFunctions.ToObject(dr["QUANTITY_SYSTEM"]));
			this.AllowProducting = Convert.ToString(CommonFunctions.ToObject(dr["ALLOW_PRODUCTING"]));
			this.WebsiteUrl = Convert.ToString(CommonFunctions.ToObject(dr["WEBSITE_URL"]));
			this.SupplierType = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_TYPE"]));
			this.PaymentType = Convert.ToString(CommonFunctions.ToObject(dr["PAYMENT_TYPE"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return MstSupplierTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_ID)); }
            set { SetData(MstSupplierTable.C_ID, value); }
        }
		
        [DataMember]
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_CREATED_BY)); }
            set { SetData(MstSupplierTable.C_CREATED_BY, value); }
        }
		
        [DataMember]
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(MstSupplierTable.C_CREATED_DATE)); }
            set { SetData(MstSupplierTable.C_CREATED_DATE, value); }
        }
		
        [DataMember]
        public string UpdatedBy
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_UPDATED_BY)); }
            set { SetData(MstSupplierTable.C_UPDATED_BY, value); }
        }
		
        [DataMember]
        public DateTime UpdatedDate
        {
            get { return Convert.ToDateTime(GetData(MstSupplierTable.C_UPDATED_DATE)); }
            set { SetData(MstSupplierTable.C_UPDATED_DATE, value); }
        }
		
        [DataMember]
        public int IsActive
        {
            get { return Convert.ToInt32(GetData(MstSupplierTable.C_IS_ACTIVE)); }
            set { SetData(MstSupplierTable.C_IS_ACTIVE, value); }
        }
		
        [DataMember]
        public string SupplierCode
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_SUPPLIER_CODE)); }
            set { SetData(MstSupplierTable.C_SUPPLIER_CODE, value); }
        }
		
        [DataMember]
        public string SupplierName
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_SUPPLIER_NAME)); }
            set { SetData(MstSupplierTable.C_SUPPLIER_NAME, value); }
        }
		
        [DataMember]
        public string SupplierFullName
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_SUPPLIER_FULL_NAME)); }
            set { SetData(MstSupplierTable.C_SUPPLIER_FULL_NAME, value); }
        }
		
        [DataMember]
        public string Contact
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_CONTACT)); }
            set { SetData(MstSupplierTable.C_CONTACT, value); }
        }
		
        [DataMember]
        public string ContactPhone
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_CONTACT_PHONE)); }
            set { SetData(MstSupplierTable.C_CONTACT_PHONE, value); }
        }
		
        [DataMember]
        public string Countory
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_COUNTORY)); }
            set { SetData(MstSupplierTable.C_COUNTORY, value); }
        }
		
        [DataMember]
        public string Province
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_PROVINCE)); }
            set { SetData(MstSupplierTable.C_PROVINCE, value); }
        }
		
        [DataMember]
        public string City
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_CITY)); }
            set { SetData(MstSupplierTable.C_CITY, value); }
        }
		
        [DataMember]
        public string Address
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_ADDRESS)); }
            set { SetData(MstSupplierTable.C_ADDRESS, value); }
        }
		
        [DataMember]
        public string ZipCode
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_ZIP_CODE)); }
            set { SetData(MstSupplierTable.C_ZIP_CODE, value); }
        }
		
        [DataMember]
        public string Email
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_EMAIL)); }
            set { SetData(MstSupplierTable.C_EMAIL, value); }
        }
		
        [DataMember]
        public string Telephone
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_TELEPHONE)); }
            set { SetData(MstSupplierTable.C_TELEPHONE, value); }
        }
		
        [DataMember]
        public string DefaultCurrency
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_DEFAULT_CURRENCY)); }
            set { SetData(MstSupplierTable.C_DEFAULT_CURRENCY, value); }
        }
		
        [DataMember]
        public string Bank
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_BANK)); }
            set { SetData(MstSupplierTable.C_BANK, value); }
        }
		
        [DataMember]
        public string BankAccount
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_BANK_ACCOUNT)); }
            set { SetData(MstSupplierTable.C_BANK_ACCOUNT, value); }
        }
		
        [DataMember]
        public string TaxAccount
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_TAX_ACCOUNT)); }
            set { SetData(MstSupplierTable.C_TAX_ACCOUNT, value); }
        }
		
        [DataMember]
        public string Level
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_LEVEL)); }
            set { SetData(MstSupplierTable.C_LEVEL, value); }
        }
		
        [DataMember]
        public string LegalPerson
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_LEGAL_PERSON)); }
            set { SetData(MstSupplierTable.C_LEGAL_PERSON, value); }
        }
		
        [DataMember]
        public decimal RegisteredCapital
        {
            get { return Convert.ToDecimal(GetData(MstSupplierTable.C_REGISTERED_CAPITAL)); }
            set { SetData(MstSupplierTable.C_REGISTERED_CAPITAL, value); }
        }
		
        [DataMember]
        public string ProductScope
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_PRODUCT_SCOPE)); }
            set { SetData(MstSupplierTable.C_PRODUCT_SCOPE, value); }
        }
		
        [DataMember]
        public string RegisteredAddress
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_REGISTERED_ADDRESS)); }
            set { SetData(MstSupplierTable.C_REGISTERED_ADDRESS, value); }
        }
		
        [DataMember]
        public string QuantitySystem
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_QUANTITY_SYSTEM)); }
            set { SetData(MstSupplierTable.C_QUANTITY_SYSTEM, value); }
        }
		
        [DataMember]
        public string AllowProducting
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_ALLOW_PRODUCTING)); }
            set { SetData(MstSupplierTable.C_ALLOW_PRODUCTING, value); }
        }
		
        [DataMember]
        public string WebsiteUrl
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_WEBSITE_URL)); }
            set { SetData(MstSupplierTable.C_WEBSITE_URL, value); }
        }
		
        [DataMember]
        public string SupplierType
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_SUPPLIER_TYPE)); }
            set { SetData(MstSupplierTable.C_SUPPLIER_TYPE, value); }
        }
		
        [DataMember]
        public string PaymentType
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_PAYMENT_TYPE)); }
            set { SetData(MstSupplierTable.C_PAYMENT_TYPE, value); }
        }
		
        [DataMember]
        public string Status
        {
            get { return Convert.ToString(GetData(MstSupplierTable.C_STATUS)); }
            set { SetData(MstSupplierTable.C_STATUS, value); }
        }
		
		#endregion
	}
	
	
}	

